﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using System.Data;

namespace WebsiteAdmin.Wilson.AboutUs
{
    public partial class ArticleEdit : System.Web.UI.Page
    {
        public int pkid;
        public string notesTitle;
        public string notesContent;
        public string description;
        public string urlName;


        public string keywords;
        public int isDisplay;
        public int displayOrder;
        public int isFoot;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                pkid = Convert.ToInt32(Request["pkid"], CultureInfo.InvariantCulture);
                DataTable dtNotes = Bll.Notes.Single(Global.ConnWilson, pkid);
                if (dtNotes.Rows.Count == 1)
                {
                    notesTitle = dtNotes.Rows[0]["NotesTitle"].ToString();
                    notesContent = dtNotes.Rows[0]["NotesContent"].ToString();
                    urlName = dtNotes.Rows[0]["NotesCode"].ToString();
                    description = dtNotes.Rows[0]["Description"].ToString();
                    keywords = dtNotes.Rows[0]["Keywords"].ToString();
                    isDisplay = Convert.ToInt16(dtNotes.Rows[0]["IsDisplay"]);
                    displayOrder = Convert.ToInt16(dtNotes.Rows[0]["SortBy"]);
                    isFoot = Convert.ToInt16(dtNotes.Rows[0]["IsFoot"]);

                }
                dtNotes.Dispose();
            }
        }
    }
}
